Multiple phase clocks are used in a variety of systems. For example, data recovery, when the clock phase needs to be put forward or backward, especially when calibration and training are needed. In some chips such as memory a clock phase often needs to be calibrated or trained to get maximum timing margin and to achieve maximum work frequency. However directly switching to another phase can cause glitches and abrupt timing changes. This presents a problem.